package cn.springcloudtest.controller;

import cn.springcloudtest.common.Dto;
import cn.springcloudtest.service.TopicService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @ProjectName:springcloud-topic-consumer
 * @Author:赵伟杰
 * @Date:2021年09月06日 8:49
 */
@CrossOrigin
@RestController("/api")
public class TopicController {


    @Resource
    private TopicService topicService;

    @RequestMapping("/getTopic")
    public Dto getTopic() {
        return topicService.getTopicList();
    }



}
